Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom Octicons in admin nav sections #4382

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wosevision
Copy link

@wosevision wosevision commented Jul 5, 2017

This pull request adds support for the ability to specify custom icon classes to associate with Admin UI nav sections, i.e. those configured by keystone.set('nav', ...).

I proposed this feature not too long ago but didn't realize then what an easy change it would be (the feature is basically already "built in" and just needed a tweak to "enable" it).

To use this feature, instead of writing

keystone.set('nav', {
    'small animals': ['mice', 'rats']
});

you can instead write

keystone.set('nav', {
    'small animals': {
        lists: ['mice', 'rats'],
        icon: 'octicon octicon-squirrel'
});

which will override the default 'bullet' icon. All previous behaviours are left intact (bullet is still default if no icon provided, component still "auto-selects" an icon based on list name).

The auto-selecting behaviour struck me as a bit presumptuous; this pull request hopes to address that by opening it up completely.

Might deal with #3505.

@kmiddlesworth
Copy link

kmiddlesworth commented Oct 30, 2017

Hey there, I'd love to know if a merge is planned for this. This functionality would be great!

@DaTebe
Copy link

DaTebe commented Sep 19, 2018

I would also like to see this feature

@Norbz
Copy link

Norbz commented Nov 20, 2018

Once again, a small but usefull feature dead in its tracks because of no one validating PR...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants